<script>
import { h, inject, ref } from "@vue/runtime-core";
export default {
  inject: ["self"],
  setup(props, { expose }) {
    const count = ref(0);
    const loca = inject("location");
    const increment = () => ++count.value;
    expose({
      increment,
    });
    console.log(props, expose, loca);
    let str = ref("heo");
    return () =>
      h("div", {}, [
        h("h1", {}, [str.value, loca]),
        [1, 3, 4].map((res) => {
          return h("h1", {}, res);
        }),
      ]);
  },
  mounted() {
    console.log(this.self()(), "sss");
  },
};
</script>

<style></style>
